package com.agileboot.domain.medicine.dto;

import com.agileboot.common.annotation.ExcelColumn;
import com.agileboot.domain.medicine.db.Medicine;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class MedicineDTO{

    public MedicineDTO(Medicine medicine) {
        if (medicine !=null){
            this.id = medicine.getId().toString();
            this.name = medicine.getName();
            this.nickName = medicine.getNickName();
            this.gather = medicine.getGather();
            this.shape = medicine.getShape();
            this.originalForm = medicine.getOriginalForm();
            this.composition = medicine.getComposition();
            this.taboo = medicine.getTaboo();
            this.image = medicine.getImage();
            this.address = medicine.getAddress();
            this.flavorTropism=medicine.getFlavorTropism();
            this.effect = medicine.getEffect();
            this.supplement=medicine.getSupplement();
            this.type=medicine.getType();
            this.status=medicine.getStatus();
        }
    }

    private String id;
    //中文名字
    @ExcelColumn(name = "名字")
    private String name;
    //别名
    @ExcelColumn(name = "别名")
    private String nickName;
    //采收加工
    @ExcelColumn(name = "采收加工")
    private String gather;
    //药材性状
    @ExcelColumn(name = "药材性状")
    private String shape;
    //植物形态
    @ExcelColumn(name = "植物形态")
    private String originalForm;


    //图片列表
    @ExcelColumn(name = "图片列表")
    private String image;
    //产地分布
    @ExcelColumn(name = "产地分布")
    private String address;
    //性味归经
    @ExcelColumn(name = "性味")
    private String flavorTropism;
    //功用主治
    @ExcelColumn(name = "功用主治")
    private String effect;
    //化学成分
    @ExcelColumn(name = "化学成分")
    private String composition;
    //宜忌
    @ExcelColumn(name = "宜忌")
    private String taboo;
    //分类类型
    @ExcelColumn(name = "分类类型")
    private String type;
    //补充
    @ExcelColumn(name = "补充")
    private String supplement;
    //状态
    @ExcelColumn(name = "状态0未启用1启用")
    private Integer status;
}
